{*include file="template/admin_head.htm"*}
<script type="text/javascript">
	
	var my_box_sfun = function(){			//固定函数,提交callback
	
				alert('sfun');
				return false;	
				//$("#button").hide();
			}
	var my_box_cfun=function(){			//固定函数,取消callback,或为空
				//alert('close');	
				return true;
			}
	
	$(function(){
			
			$("#button").click(function(){
				my_box('请输入内容','确认提示',800,300);
			});
			
			
			
		function add_img_cookie(img){
			var list = $.cookie('img_cookie');
			if(list)	{
				var pArray = list.split(','); 
				var add = true;  									//是否存入
				for (var i = 0; i < pArray.length; i++) {  		//是否已存在
					if (pArray[i] == img) {  						//存在 不添加
						return false;  
						//break;  
					}  
				}   								
				list = list + ','+img;
				$.cookie('img_cookie', list,{expires: 1});			//不存在 存入
				return true;
			}else{
				$.cookie('img_cookie', img,{expires: 1});			//不存在cookie 直接存
				return true;
			}
			
		}
		
		function check_img_cookie(img){
			var list = $.cookie('img_cookie');
			if(list){
				var pArray = list.split(','); 								
				for (var i = 0; i < pArray.length; i++) {  		//是否已存在
					if (pArray[i] == img) {  						//存在
						return true;  
					}  
				}   
			}else{
				return false;										//不存在
			}
		}
		
		//add_img_cookie("/upload/test2.jpg");
		/*if(check_img_cookie("/upload/test1.jpg")==true){
			alert('yes');
		}else{
			alert('no');
		}*/
		
		//my_box('Pass','');
		load_province('area',190000,190300);													//默认加载
		load_province('cate',1,102);													//默认加载
		load_province('group',1,102);													//默认加载
		load_province('group_area',190301,500003);													//默认加载
		$("#province").change(function(){                                   //更改省份
                change_province('area',$(this).val());
         });
		 
		$("#cate1").change(function(){                                   //更改分类
                change_province('cate',$(this).val());
         }); 
		 
		 $("#group1").change(function(){                                   //更改分类
                change_province('group',$(this).val());
         });
		 
		  $("#group_area1").change(function(){                                   //更改分类
                change_province('group_area',$(this).val());
         });
	})
	</script>
	
<table id="containtable" cellspacing="0" cellpadding="0" class="{*$cf_controller*}">
    <tr>
        <td width="1979" valign="top" bgcolor="#FFFFFF">


            <div class="wrapper pr_8">


                <script type="text/javascript">
				
				


				
				
				
		    $(function(){
				file_uploader('#file_upload','#file_upload_url','media',"{*$cf_module*}",'{*$cf_sessionid*}');
				file_uploader('#file_upload2','#file_upload2_url','apk',"{*$cf_module*}",'{*$cf_sessionid*}');
				
			call_uploader('#photo_bt1','#photo_url1','image',{'manage':false,'show':'#photo_show1'});
			call_uploader('#photo_bt2','#photo_url2','image',{'manage':true,'show':'#photo_show2'});
			call_uploader('#photo_bt3','#photo_url3','image',{'manage':true,'show':'#photo_show3'});
			call_uploader('#photo_bt4','#photo_url4','image',{'manage':true,'show':'#photo_show4'});
			call_uploader('#photo_bt5','#photo_url5','image',{'manage':true,'show':'#photo_show5'});

			call_uploader2('.myuploader','image',{"path":"{*$cf_module*}"});

		    })
                </script>

                <div class="content_panel_title">
                    <div class="contentpanelleft"></div>
                    <div class="contentpanelcenter">
                        <span class="contentpanelcenter_font">新增/修改题目{*$row.coupon_prize*}</span>
                        <span><a class="edit at" href="{*$cf_self_page*}?dpt={*$cf_dpt*}">题目管理</a></span>                            </div>
                    <div class="contentpanelrihgt"></div>
                </div>
                <div class="content_table_center_style">
                    <div class="p8">

                        <form action="{*$cf_self_page*}" method="post" enctype="multipart/form-data" name="act_form" id="act_form">
                            <input name="id" id="id" type="hidden" value="{*$row.question_id*}" />
                            <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                            <input name="act" id="act" type="hidden" value="{*$cf_action*}" />
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
                                <tbody>
                                    <tr>
                                        <td colspan="4" class="stitle">题目信息</td>
                                    </tr>
                                    <tr>
                                    	<td align="right">&nbsp;</td>
                                    	<td colspan="3" align="left"><input type="button"  name="button" id="button" value="box" /></td>
                                   	</tr>
                                    <tr>
                                    	<td align="right">in_aray测试</td>
                                    	<td colspan="3" align="left">{*if '交通旅游'|in_array:$cf_info_var_common.question_type*}y{*else*}no{*/if*}<br />

										{*if in_array('交通旅游',$cf_info_var_common.question_type)*}yyy{*else*}no{*/if*}
										</td>
                                   	</tr>
                                    <tr>
                                    	<td align="right">&nbsp;</td>
                                    	<td colspan="3" align="left"><table width="80%" border="0">
                                    		<tr>
                                    			<td align="center"><span id='photo_show1'></span></td>
                                    			<td align="center"><span id='photo_show2'></span></td>
                                    			<td align="center"><span id='photo_show3'></span></td>
                                    			<td align="center"><span id='photo_show4'></span></td>
                                    			<td align="center"><span id='photo_show5'></span></td>
                                    			</tr>
                                    		<tr>
                                    			<td align="center"><input type="hidden" name="photo[]" id="photo_url1" value="" /><input type="button" id="photo_bt1" value="选择图片" /></td>
                                    			<td align="center"><input type="hidden" name="photo[]" id="photo_url2" value="" /><input type="button" id="photo_bt2" value="选择图片" /></td>
                                    			<td align="center"><input type="hidden" name="photo[]" id="photo_url3" value="" /><input type="button" id="photo_bt3" value="选择图片" /></td>
                                    			<td align="center"><input type="hidden" name="photo[]" id="photo_url4" value="" /><input type="button" id="photo_bt4" value="选择图片" /></td>
                                    			<td align="center"><input type="hidden" name="photo[]" id="photo_url5" value="" /><input type="button" id="photo_bt5" value="选择图片" /></td>
                                    			</tr>
                                   		</table></td>
                                   	</tr>
                                    <tr>
                                    	<td align="right">&nbsp;</td>
                                    	<td colspan="3" align="left"><span id='myupfile1_show'></span><input type="hidden" name="upfile[]" id="myupfile1_url" value="" /><input class="myuploader" type="button" id="myupfile1" value="选择图片" /><input type="text" id="myupfile1_text" /></td>
                                   	</tr>
									 <tr>
                                    	<td align="right">&nbsp;</td>
                                    	<td colspan="3" align="left"><span id='myupfile2_show'></span><input type="hidden" name="upfile[]" id="myupfile2_url" value="" /><input class="myuploader" type="button" id="myupfile2" value="选择图片" /><input type="text" id="myupfile2_text" /></td>
                                   	</tr>
                                    <tr>
                                    	<td align="right">&nbsp;</td>
                                    	<td align="left">&nbsp;</td>
                                    	<td align="right">&nbsp;</td>
                                    	<td align="left">&nbsp;</td>
                                   	</tr>
                                
                                    <tr>
					<td align="right">分类:</td>
					<td align="left"><select name="cate1" id="cate1">
            <option value='' selected="selected">请选择分类</option>
       </select>
       <select name="cate2" id="cate2" disabled="disabled" style="display:none">
            <option value='' selected="selected">请选择子分类</option>
       </select></td>
					<td align="right">&nbsp;</td>
					<td align="left">&nbsp;</td>
				    </tr>
                                    <tr>
					<td align="right">地区:</td>
					<td align="left"><select name="province" id="province">
            <option value='' selected="selected">请选择省份</option>
       </select>
       <select name="city" id="city" disabled="disabled" style="display:none">
            <option value='' selected="selected">请选择城市</option>
       </select></td>
					<td align="right">&nbsp;</td>
					<td align="left">&nbsp;</td>
				    </tr>
                                    <tr>
					<td align="right">团购分类:</td>
					<td align="left"><select name="group1" id="group1">
            <option value='' selected="selected">请选择分类</option>
       </select>
       <select name="group2" id="group2" disabled="disabled" style="display:none">
            <option value='' selected="selected">请选择了分类</option>
       </select></td>
					<td align="right">&nbsp;</td>
					<td align="left">&nbsp;</td>
				    </tr>
                 
			<tr>
					<td align="right">团购商业圈:</td>
					<td align="left"><select name="group_area1" id="group_area1">
            <option value='' selected="selected">请选择地区</option>
       </select>
       <select name="group_area2" id="group_area2" disabled="disabled" style="display:none">
            <option value='' selected="selected">请选择商业圈</option>
       </select></td>
					<td align="right">&nbsp;</td>
					<td align="left">&nbsp;</td>
				    </tr>
									
									
									
									<tr>
                                    	<td align="right">mp3</td>
                                    	<td colspan="3" align="left">
										<div id="file_upload_show"></div>
                                   		<div id="file_upload" name="file_upload"></div>
										<input id="file_upload_url" name="file_upload_url" type="hidden" > </td>
                                   	</tr>
									<tr>
                                    	<td align="right">apk</td>
                                    	<td colspan="3" align="left">
										<div id="file_upload2_show"></div>
                                   		<div id="file_upload2" name="file_upload2"></div>
										<input id="file_upload2_url" name="file_upload2_url" type="hidden" > </td>
                                   	</tr>
                                    <tr>
                                    	<td align="right">&nbsp;</td>
                                    	<td align="left">&nbsp;</td>
                                    	<td align="right">&nbsp;</td>
                                    	<td align="left">&nbsp;</td>
                                   	</tr>
                                    <tr>
                                        <td width="11%" align="right">题目:</td>
                                        <td width="34%" align="left">&nbsp;</td>
                                        <td width="14%" align="right">分类:</td>
                                        <td width="41%" align="left">{*html_options name=question_type options=$cf_info_var_common.question_type selected=$row.question_type|default:'0'*}</td>
                                    </tr>

                                    <!-- <tr id="uploadify_part">
                                         <td align="right">已上傳圖片:</td>
                                         <td colspan="3" align="left"><div id="uploadify_list"></div><input type="button" id="uploadify_del" name="uploadify_del" value="删除圖片" class="myinput1"  /></td>
                                     </tr>-->
                                    <tr>
                                        <td colspan="4" class="stitle">其它信息</td>
                                    </tr>
                                    
                                </tbody>
                            </table>
                            <div class="pt_8" align="center"><input type="submit" name="Submit" value="提 交" class="myinput" />
                                &nbsp;&nbsp;
				<input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></div>
                        </form>
                    </div>
                </div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>
                <div style="display:none"><ul id="copy_info"><li><b><input name="item_name[]" type="text" class="item_name" size="52" /></b><span><a href="javascript:void(0)" class="del_item"><img src="public/images/admin/close.png" /></a></span></li></ul></div>


            </div>        </td>
    </tr>
</table>
{*include file="template/admin_foot.htm"*}